Repository navigation
fix: raise secondary text contrast, enlarge small targets, and honor reduced motion (#7) - #18
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
… honor reduced motion (#7) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…cks (#7) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…7 plan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the WCAG 2.2 AA contrast, target size, and motion problems from #7. The change is CSS only (
src/index.css), with two new token-level tests. The dark HUD look is kept.--text-dimgoes from#2d5a42to#5aa37f. That is the smallest step from the old value toward--text-primary(same hue) that clears 4.5:1 on every background where dim text sits. It covers the GPU panel keys, the "SYS" status, the "ACTIVE n/n" footer, OFF labels, popup property keys, and the Close glyph..gpu-info-seploses itsopacity: 0.5, since at half opacity it could not pass with any dim value.@media (prefers-reduced-motion: reduce)block setsanimation: none !important; transition: none !importanton everything. That stops the indicator pulse, the popup slide-up, the bottom sheet fade-in from Layout breaks on mobile: header text overlaps and panels overflow at 375px #5, and the hover transitions.!importantis needed to win over the narrow block's lateranimation-name: fade-in.Contrast, old and new. Backgrounds are modeled as rendered. Panels over the map use
--bg-panelcomposited over white, the worst case.--bg-panelover--bg-void)--bg-deep(Close glyph, sticky popup header)--accent-glowover panel over white).gpu-info-sep(was at 0.5 opacity)--redon panel over whiteNot done: the issue's "consider a 12px minimum" for body text. Raising the 8 to 11px text (badge, status, GPU panel, panel labels) would undo the 641px header spacing and the GPU panel widths that #5 tuned. That is left as a follow-up.
Plan
docs/plans/2026-11-07-issue-7-contrast-and-target-size.md, committed in 2a91fab. Revisions:--text-dimmoved from the first value,#4f9170, to#5aa37f. Review found that a hovered OFF row puts the dim text on--accent-glow(3.72:1 over a white map). A token step was chosen over a new hovercolor:rule, which keeps the change to one token. A criterion 1 background model for the hovered row was added.Frozen tests:
src/styles.test.js(red in c295aa5) andsrc/styles.states.test.js(red in a1428ff).Test evidence
Gate on 307813e (0a09b38 changes plan text only):
npm ci: 0 vulnerabilities.npm run lint: clean.npm test: 17 files, 167 tests passed.npm run build: built. The usual large-chunk warning is printed.npm audit --omit=dev --audit-level=high: 0 vulnerabilities.New unit tests:
src/styles.test.jsparses the:roottokens out ofsrc/index.cssand computes WCAG contrast for every text pair, and for the slider track, thumb, and off dot at 3:1. It fails if anycolor:rule inindex.cssis missing from its pair table. It also asserts the 24px sizes and the reduced-motion block.src/styles.states.test.jsmodels the hovered layer row. It fails if any:hover,:focus,:active, or:has(rule sets a background without a modeled state pair.Live drive and independent verification (Playwright, headless Chromium, against
vite build+vite preview):reducedMotion: 'reduce', at 1440 and 375,.panel-indicator,.feature-popup,.layer-row,.layer-dot,.layer-label, and.popup-closeall computeanimation-name: noneandtransition: none 0s.document.getAnimations()is empty, and the indicator stays at opacity 1.blink-pulse(2.4s),slide-up(1440),fade-in(375), and the 0.15s transitions all still run..stress-count"5.0M PTS" fitsvite preview:Lighthouse passed before the fix too. axe cannot determine backgrounds over the map canvas and gradients, so it reports those nodes as "incomplete", and Lighthouse does not fail on "incomplete". After the fix, axe in the page reported 0 color-contrast violations and 29 to 35 incomplete. That is why the token tests and the computed checks above are the real proof.
Not verified in a browser: Firefox
::-moz-range-*rules (only Chromium was driven; the unit test asserts the sizes). The heatmap layer row did not render in headless, which has no WebGPU.Review findings
--text-dimvalue. Fixed in 307813e, with the new frozen test a1428ff.compact: true(node_modules/maplibre-gl/dist/maplibre-gl-dev.mjs,defaultAttributionControlOptions), so only the compact form renders. In the browser it measured opaque white with 21:1 text and 10.4:1 links, at 1440 and 375, and minimized it is a 24x24 button.rule()insrc/styles.test.jsmerges same-selector rules across media blocks. Nothing triggers this today.Docs reconciled
README.md: no change needed, because it says nothing about colors, control sizes, or motion that this change makes false.CLAUDE.md: no change needed, because no mistake repeated across runs. The new style tests explain themselves when they fail.Closes #7
🤖 Generated with Claude Code
https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf